home *** CD-ROM | disk | FTP | other *** search
/ PC Format (UK) 79 / PC Format 79 - Feb 1998.iso / Critical / Barclays / DEMO16.DIR / 00001_Script_movie script next >
Text File  |  1997-12-08  |  2KB  |  78 lines

  1. on startMovie
  2.   global pointCursor,gt
  3.   set pointCursor to [the number of member "pointer cursor", the number of member "pointer mask"]
  4.   if gt=1 then set the text of member "gtbanner" to "(Click on 'next' to continue¼
  5.  with the guided tour)"
  6. end
  7.  
  8. on stopMovie
  9. end
  10.  
  11. on keydown
  12.   if the type of the member of sprite 36 = #digitalVideo then
  13.     set the movieRate of sprite 36 to 0
  14.   end if
  15.   repeat with n = 1 to 30
  16.     puppetSprite n, FALSE
  17.     set the cursor of sprite n to 0
  18.   end repeat
  19.   puppetSound 0
  20.   go to "start"
  21. end
  22.  
  23. on wait howlong
  24.   set currentTime to the timer
  25.   repeat while currentTime + howlong > the timer
  26.     nothing
  27.   end repeat
  28. end
  29.  
  30. on waitforfade
  31.   wait 60
  32. end
  33.  
  34. on click
  35.   puppetSound 2, "click"
  36.   updateStage
  37.   updateStage
  38.   wait 30
  39. end
  40.  
  41. on clickFade
  42.   click
  43.   global gt
  44.   set gt=0
  45.   set the text of member "gtbanner" to ""
  46.   set the cursor of sprite the clickOn to 0
  47.   puppetSprite the clickOn, FALSE
  48.   sound fadeOut 1, 60
  49. end
  50.  
  51. on clickFadeMovie
  52.   set the text of member "gtbanner" to ""
  53.   global gt
  54.   set gt=0
  55.   set the movieRate of sprite 36 to 0
  56.   clickFade
  57. end
  58.  
  59. on moveCursor targetH, targetV, timeLength
  60.   set rate = 16
  61.   set increments = float(timeLength)/float(60)*rate
  62.   puppetSprite 31, TRUE
  63.   set startH to the locH of sprite 31
  64.   set startV to the locV of sprite 31
  65.   set incH to float(the locH of sprite 31 - targetH) / increments
  66.   set incV to float(the locV of sprite 31 - targetV) / increments
  67.   startTimer
  68.   repeat with n = 1 to increments
  69.     set the locH of sprite 31 to startH - (incH*n)
  70.     set the locV of sprite 31 to startV - (incV*n)
  71.     updateStage
  72.     wait timeLength/increments*n - the timer
  73.   end repeat
  74.   set the locH of sprite 31 to targetH
  75.   set the locV of sprite 31 to targetV
  76.   puppetSprite 31, FALSE
  77. end
  78.